<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>分类信息 - Powered By ${systemConfig.systemName}</title>
    <meta name="Author" content="E-SHOP Team" />
    <meta name="Copyright" content="E-SHOP" />

    <link rel="stylesheet" href="${base}/res/css/amazeui.min.css">

    <link rel="icon" href="favicon.ico" type="image/x-icon" />
    <% include("/WEB-INF/views/common/include.html"){}%>
    <link href="${base}/template/shop/css/login.css" rel="stylesheet" type="text/css" />
    <link href="${base}/template/shop/css/register.css" rel="stylesheet" type="text/css" />
    <link href="${base}/template/shop/css/member_center.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="${base}/template/shop/js/login.js"></script>
    <script type="text/javascript" src="${base}/template/shop/js/register.js"></script>

    <!--日期控件-->
    <script type="text/javascript" src="${base}/res/plugins/hplus/js/plugins/layer/laydate/laydate.js"></script>
    <style type="text/css">
        *, :before, :after {
            -webkit-box-sizing: border-box;
            box-sizing: content-box;
        }
        .laydate-icon{
            margin-left: 18px;
        }
    </style>
    <script type="text/javascript">
        $().ready( function() {
            // 地区选择菜单
            $(".areaSelect").lSelect({
                url: "${base}/area/ajaxChildrenArea"// Json数据获取url
            });

        });
    </script>
    <script>
        var start = {
            elem: '#start',
            format: 'YYYY-MM-DD hh:mm:ss',
            min: laydate.now(), //设定最小日期为当前日期
            max: '2099-06-16 23:59:59', //最大日期
            istime: true,
            istoday: false,
            choose: function(datas){
                end.min = datas; //开始日选好后，重置结束日的最小日期
                end.start = datas //将结束日的初始值设定为开始日
            }
        };
        var end = {
            elem: '#end',
            format: 'YYYY-MM-DD hh:mm:ss',
            min: laydate.now(),
            max: '2099-06-16 23:59:59',
            istime: true,
            istoday: false,
            choose: function(datas){
                start.max = datas; //结束日选好后，重置开始日的最大日期
            }
        };
        $(function () {
            laydate(start);
            laydate(end);
        });

    </script>
    <%
    var isAdd = false;
    var isEdit = false;

    if(isEmpty(activity.id)){
    isAdd = true;
    }else{
    isEdit = true;
    }%>
</head>
<body class="memberCenter">
<%include("/shop/header_business.html"){}%>
<div class="body profileInput">
    <div class="bodyLeft">
        <%include("/shop/sidebar_business.html"){}%>
    </div>
    <div class="bodyRight">

        <div class="memberCenterDetail">
            <div class="top">
                <%if(isAdd){%>添加活动<%}else{%>编辑活动<%}%>
            </div>
            <div class="admin-content middle">
                <hr style="padding:0px 1.6rem 1.6rem 1rem;margin:0px;">
                <div class="am-g" >
                    <div class="am-u-sm-12" style="padding:0px 5px 0px 0px;margin:0px; height: 600px;width: 200%;">
                        <form id="inputForm" class="am-form" action="<%if (isAdd){%>${base}/shop/activities/save<%}else{%>${base}/shop/activities/update<%}%>" method="post">
                            <input type="hidden" name="activity.id" value="${activity.id!}" />

                            <div class="am-g am-margin-top">
                                <div class="am-u-sm-4 am-u-md-1 am-text-right">活动名称</div>
                                <div class="am-u-sm-8 am-u-md-4">
                                    <input type="text" name="activity.name" class="am-input-sm" value="${activity.name!}" required/>
                                </div>
                                <div class="am-hide-sm-only am-u-md-6 am-text-warning"></div>
                            </div>
                            <div class="am-g am-margin-top">
                                <div class="am-u-sm-4 am-u-md-1 am-text-right">开始时间</div>
                                <input placeholder="请输入日期" name="activity.starttime" class="laydate-icon " id="start" value="${activity.starttime!}" >
                            </div>
                            <div class="am-g am-margin-top">
                                <div class="am-u-sm-4 am-u-md-1 am-text-right">结束时间</div>
                                <input placeholder="请输入日期" name="activity.endtime" class="laydate-icon" id="end" value="${activity.endtime!}" >
                            </div>
                            <div class="am-g am-margin-top">
                                <div class="am-u-sm-4 am-u-md-1 am-text-right">页面关键词</div>
                                <div class="am-u-sm-8 am-u-md-4">
                                    <input type="text" name="productCategory.metaKeywords" class="am-input-sm" value="${productCategory.metaKeywords!}" />
                                </div>
                                <div class="am-hide-sm-only am-u-md-6 am-text-warning">&nbsp;</div>
                            </div>

                            <!--<div class="am-g am-margin-top">
                                <div class="am-u-sm-4 am-u-md-1 am-text-right">页面描述</div>
                                <div class="am-u-sm-8 am-u-md-4">
                                    <textarea name="productCategory.metaDescription" rows="7"></textarea>
                                </div>
                                <div class="am-hide-sm-only am-u-md-6 am-text-warning">&nbsp;</div>
                            </div>-->

                            <div class="am-g am-margin-top" style="margin-left: 61px;">
                                <div class="am-u-sm-12 am-u-md-1 am-text-right admin-form-text"></div>
                                <div class="am-u-sm-12 am-u-md-11">
                                    <button type="submit" class="am-btn am-btn-primary am-btn-sm">提交保存</button>
                                    <button type="button" class="am-btn am-btn-warning am-btn-sm" onclick="window.history.back(); return false;">放弃保存</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
            <div class="bottom"></div>
        </div>

    </div>
</div>
<%include("business_member_bottom.html"){}%>
</body>
</html>
